from django.shortcuts import render

from .ser import *  #应用序列化器
from .models import *  #从模型类导包
from rest_framework.views import APIView  #接口
from rest_framework.response import Response  #返回值
from django.core.paginator import Paginator  #分页导包
from django.contrib.auth.hashers import make_password,check_password  #用户登陆密码及效验
from django.db.models import Max,Sum  #聚合函数导包
import datetime  #导入时间包
import math  #数学导包



# Create your views here.


class GradeManage(APIView):
    def get(self,request):
        grade = Grade.objects.all()
        ser = GradeManageSer(grade,many=True)
        return Response({"code":200,'list':ser.data})







